#include <REGX52.H>
#include "HCSR04.h"
#include "UART.h"
#include "LCD1602.h"
#include "Delay.h"

void main(){

	LCD1602_Init();
	HCSR04_Init();
	LCD1602_PrintString(1,1,"Distance:");
	LCD1602_PrintString(1,13,"cm");
	while(1)
	{
		LCD1602_PrintNum(1, 10, HCSR04_GetDistance(), 3);
		Delay(100);
	}
}